home *** CD-ROM | disk | FTP | other *** search
/ Mac Power 1997 December / MACPOWER-1997-12.ISO.7z / MACPOWER-1997-12.ISO / AMUG / PROGRAMMING / Raven 1.2.sit / Raven 1.2 / • Extras • / Contextual Menu Headers / ContextualMenu.h < prev    next >
Text File  |  1997-06-23  |  2KB  |  75 lines

  1. #ifndef __CONTEXTUALMENU__
  2. #define __CONTEXTUALMENU__
  3.  
  4. #ifndef __APPLEEVENTS__
  5. #include <AppleEvents.h>
  6. #endif
  7. #ifndef __EVENTS__
  8. #include <Events.h>
  9. #endif
  10. #ifndef __MENUS__
  11. #include <Menus.h>
  12. #endif
  13.  
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17.  
  18. #if PRAGMA_IMPORT_SUPPORTED
  19. #pragma import on
  20. #endif
  21.  
  22. #if PRAGMA_ALIGN_SUPPORTED
  23. #pragma options align=mac68k
  24. #endif
  25.  
  26.  
  27. enum {
  28.     _ContextualMenuDispatch        = 0xAA72                        /* Contextual Menu Trap Number*/
  29. };
  30.  
  31.  
  32. enum {
  33.                                                                 /* Gestalt Selectors */
  34.     gestaltContextualMenuAttr    = 'cmnu',
  35.     gestaltContextualMenuPresent = 0,
  36.     gestaltContextualMenuTrapAvailable = 1
  37. };
  38.  
  39.  
  40. enum {
  41.                                                                 /* Values indicating what kind of help the application supports */
  42.     kCMHelpItemNoHelp            = 0,
  43.     kCMHelpItemAppleGuide        = 1,
  44.     kCMHelpItemOtherHelp        = 2,                            /* Values indicating what was chosen from the menu */
  45.     kCMNothingSelected            = 0,
  46.     kCMMenuItemSelected            = 1,
  47.     kCMShowBalloonSelected        = 2,
  48.     kCMShowHelpSelected            = 3
  49. };
  50.  
  51. extern pascal OSStatus InitContextualMenus(void )
  52.  TWOWORDINLINE(0x7001, 0xAA72);
  53.  
  54. extern pascal Boolean IsShowContextualMenuClick(const EventRecord *inEvent)
  55.  TWOWORDINLINE(0x7002, 0xAA72);
  56.  
  57. extern pascal OSStatus ContextualMenuSelect(MenuRef inMenuRef, Point inGlobalLocation, Boolean inBalloonAvailable, UInt32 inHelpType, ConstStr255Param inHelpItemString, const AEDesc *inSelection, UInt32 *outUserSelectionType, SInt16 *outMenuID, UInt16 *outMenuItem)
  58.  TWOWORDINLINE(0x7003, 0xAA72);
  59.  
  60.  
  61. #if PRAGMA_ALIGN_SUPPORTED
  62. #pragma options align=reset
  63. #endif
  64.  
  65. #if PRAGMA_IMPORT_SUPPORTED
  66. #pragma import off
  67. #endif
  68.  
  69. #ifdef __cplusplus
  70. }
  71. #endif
  72.  
  73. #endif /* __CONTEXTUALMENU__ */
  74.  
  75.